﻿@model ScrumProject.Models.Sprint

@{
    ViewBag.Title = "Edit";
}

<h2>Edit Sprints</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready(function () {
        $("#dateFrom").datepicker({ dateFormat: 'dd/mm/yy' });
    });
    $(document).ready(function () {
        $("#dateTo").datepicker({ dateFormat: 'dd/mm/yy' });
    });
</script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Sprint</legend>

        @Html.HiddenFor(model => model.Id)

        <p>
            Current date is: @DateTime.Now.ToString()
        </p>
        <div class="editor-label">
            @Html.LabelFor(model => model.DateFrom)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateFrom, new { id = "dateFrom" })
        </div>
        <div>
            @Html.ValidationMessageFor(model => model.DateFrom)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DateTo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DateTo, new { id = "dateTo" })
        </div>
        <div>
            @Html.ValidationMessageFor(model => model.DateTo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Velocity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Velocity)
        </div>
        <div>
            @Html.ValidationMessageFor(model => model.Velocity)
        </div>

        @*<div class="editor-label">
            @Html.LabelFor(model => model.Status)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(m => m.Status, new SelectList(new ScrumProject.ViewModels.BitStatusViewModel().GetStatus(), "Id", "StatusCode"))
            @Html.ValidationMessageFor(model => model.Status)
        </div>*@
@*
       <div class="editor-label">
            @Html.LabelFor(model => model.ProjectId, "Project")
        </div>
        <div class="editor-field">
            @Html.DropDownList("ProjectId", String.Empty)
            @Html.ValidationMessageFor(model => model.ProjectId)
        </div>*@

        <p>
            <input type="submit" value="Save" class="btn" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index", new { projectId = ViewBag.newId }, null)
</div>
